﻿using System;
using Tools.Domain.Common.Repositories.Contracts;
using Tools.Domain.Common.StateMachine;
using Webshop20.AntiCorruptionLayers.Quartz.Services.Contracts;
using Webshop20.Domain.Orders.Processes;
using Webshop20.Domain.Orders.Services.Contracts;

namespace Webshop20.Domain.Orders.Services.Implementation
{
    public class OrderProcessResurrectionService : IOrderProcessResurrectionService
    {

        IEventFactory eventFactory;
        IRepository<OrderProcess> repository;

        #region IOrderProcessResurrectionService Members

        public void ResurrectOrderProcess(int processId, Type eventType)
        {
            var orderProcess = repository.FindById(processId);
            var currentEvent = eventFactory.Create(eventType);
            orderProcess.Fire(currentEvent);
            throw new NotImplementedException();
        }

        #endregion
    }
}